#include <stdio.h>   // 包含 printf 和其他标准输入输出函数
#include <stdlib.h>  // 包含 getenv 和 malloc
#include <string.h>  // 包含 strcmp 和 strcpy

namespace CXX_STDLIB_ILLEGAL_REUSE {



	void func1(void) {
		char* temp1;
		char* temp2;
		temp1 = getenv("TEMP1");
		printf("temp1 is %s\n", temp1);
		temp2 = getenv("TEMP2");
		printf("temp1 is %s\n", temp1);
		printf("temp2 is %s\n", temp2);
		int v = strcmp(temp1, temp2);
	}

	void func2(void) {
		char* temp1;
		char* temp2;
		const char* temp = getenv("TEMP1");
		temp1 = (char*)malloc(strlen(temp) + 1);
		printf("temp1 is %s\n", temp1);
		strcpy(temp1, temp);
		temp = getenv("TEMP2");
		temp2 = (char*)malloc(strlen(temp) + 1);
		printf("temp1 is %s\n", temp1);
		printf("temp2 is %s\n", temp2);
		int v = strcmp(temp1, temp2);
	}
}